import ajax from '../util/request'
// 获取分类
export const getGoodsAjax = (params) => ajax({
    method:'get',
    url:"/categories",
    params,
    headtype:'form'
})
// 删除分类
export const delCate = (id) => ajax({
    method:'delete',
    url:"/categories/"+id,
    params:{},
    headtype:'form'
})

// 添加分类
export const addCate = (params) => ajax({
    method:'post',
    url:"/categories",
    params,
    headtype:'form'
})

// 编辑分类
export const reSetCate = (params) => ajax({
    method:'put',
    url:"/categories/"+params.cat_id,
    params,
    headtype:'form'
})